<!--
  版权信息组件
 -->
<template>
  <div class="copyright">版权所有 © {{ yearInfo }} {{ company }}</div>
</template>

<script>
import settings from '@/settings'

export default {
  name: 'Copyright',
  props: {
    current: {
      type: Number,
      default: 2020
    },
    company: {
      type: String,
      default: settings.company || '',
    },
  },
  computed: {
    yearInfo() {
      if (this['current'] <= 2020) {
        return `2020`
      } else {
        return `2020 - ${this['current']}`
      }
    }
  }
}
</script>

<style lang="scss" scoped>
// * 通用样式变量
$-font-size-default: 14px;

// * 布局样式变量
$-copyright-height: 54px;
$-copyright-color: #728096;

.copyright {
  line-height: $-copyright-height;
  font-size: $-font-size-default;
  color: $-copyright-color;
  text-align: center;
}
</style>
